package com.ruoyi.campus.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 校园防欺凌系统配置
 * 
 * @author campus-alarm
 * @date 2024-01-01
 */
@Component
@ConfigurationProperties(prefix = "campus")
public class CampusConfig {
    
    /** 文件存储配置 */
    private FileConfig file = new FileConfig();
    
    public FileConfig getFile() {
        return file;
    }

    public void setFile(FileConfig file) {
        this.file = file;
    }

    /**
     * 文件存储配置
     */
    public static class FileConfig {
        /** 存储类型：local本地存储 aliyun阿里云OSS tencent腾讯云COS qiniu七牛云 */
        private String storageType = "local";
        
        /** 本地存储路径 */
        private String localPath = "D:/campus-files/";
        
        /** 访问前缀 */
        private String accessPrefix = "/campus-files";

        public String getStorageType() {
            return storageType;
        }

        public void setStorageType(String storageType) {
            this.storageType = storageType;
        }

        public String getLocalPath() {
            return localPath;
        }

        public void setLocalPath(String localPath) {
            this.localPath = localPath;
        }

        public String getAccessPrefix() {
            return accessPrefix;
        }

        public void setAccessPrefix(String accessPrefix) {
            this.accessPrefix = accessPrefix;
        }
    }
} 